<?php
 /*
　*　用户中心文件
*/ 
if(!defined('IN_CRONLITE'))exit();
$title="任务管理";
include_once(TEMPLATE_ROOT."head.php");


if($islogin==1){

$all_sys1=$DB->count("SELECT count(*) from wjob_job WHERE sysid='1'");
$all_sys2=$DB->count("SELECT count(*) from wjob_job WHERE sysid='2'");
$all_sys3=$DB->count("SELECT count(*) from wjob_job WHERE sysid='3'");
$all_sys4=$DB->count("SELECT count(*) from wjob_job WHERE sysid='4'");
$all_sys5=$DB->count("SELECT count(*) from wjob_job WHERE sysid='5'");
$all_sys6=$DB->count("SELECT count(*) from wjob_job WHERE sysid='6'");
$all_sys7=$DB->count("SELECT count(*) from wjob_job WHERE sysid='7'");
$all_sys8=$DB->count("SELECT count(*) from wjob_job WHERE sysid='8'");

$my_sys1=$DB->count("SELECT count(*) from wjob_job WHERE sysid='1' and lx='$gl'");
$my_sys2=$DB->count("SELECT count(*) from wjob_job WHERE sysid='2' and lx='$gl'");
$my_sys3=$DB->count("SELECT count(*) from wjob_job WHERE sysid='3' and lx='$gl'");
$my_sys4=$DB->count("SELECT count(*) from wjob_job WHERE sysid='4' and lx='$gl'");
$my_sys5=$DB->count("SELECT count(*) from wjob_job WHERE sysid='5' and lx='$gl'");
$my_sys6=$DB->count("SELECT count(*) from wjob_job WHERE sysid='6' and lx='$gl'");
$my_sys7=$DB->count("SELECT count(*) from wjob_job WHERE sysid='7' and lx='$gl'");
$my_sys8=$DB->count("SELECT count(*) from wjob_job WHERE sysid='8' and lx='$gl'");

$gls=$my_sys1+$my_sys2+$my_sys3+$my_sys4+$my_sys5+$my_sys6+$my_sys7+$my_sys8;
if($row['num']==$gls){}else{
$DB->query("UPDATE wjob_user SET num= '$gls' WHERE user = '$gl'");}

navi();
echo'<div class="w h">公告栏</div><div class="box">'.$conf['gg'].'</div>';

echo'<div class="w h">网络任务控制面板</div>';
echo'<div class="row">请从以下8个系统中选择一个总任务数较少的来添加你的网络任务。<br/>你可以在这里添加网址挂刷任务和网址签到任务，QQ挂机类任务请到ＱＱ管理中添加。</div>';
echo'<div class="box">你总共建立了'.$gls.'条任务<hr/>';

$show=explode('|',$conf['show']);
echo'【系统①】<a href="index.php?mod=list&sys=1'.$link.'">>>点击进入</a><br/>系统①总任务数：'.$all_sys1.'/'.$conf['max'].'<br/>你的任务数：'.$my_sys1.'<br/>执行频率：<font color=#0000FF>'.$show[0].'</font><hr/>';
if($conf['sysnum']>='2'){
echo'【系统②】<a href="index.php?mod=list&sys=2'.$link.'">>>点击进入</a><br/>系统②总任务数：'.$all_sys2.'/'.$conf['max'].'<br/>你的任务数：'.$my_sys2.'<br/>执行频率：<font color=#0000FF>'.$show[1].'</font><hr/>';}
if($conf['sysnum']>='3'){
echo'【系统③】<a href="index.php?mod=list&sys=3'.$link.'">>>点击进入</a><br/>系统③总任务数：'.$all_sys3.'/'.$conf['max'].'<br/>你的任务数：'.$my_sys3.'<br/>执行频率：<font color=#871F78>'.$show[2].'</font><hr/>';}
if($conf['sysnum']>='4'){
echo'【系统④】<a href="index.php?mod=list&sys=4'.$link.'">>>点击进入</a><br/>系统④总任务数：'.$all_sys4.'/'.$conf['max'].'<br/>你的任务数：'.$my_sys4.'<br/>执行频率：<font color=#871F78>'.$show[3].'</font><hr/>';}
if($conf['sysnum']>='5'){
echo'【系统⑤】<a href="index.php?mod=list&sys=5'.$link.'">>>点击进入</a><br/>系统⑤总任务数：'.$all_sys5.'/'.$conf['max'].'<br/>你的任务数：'.$my_sys5.'<br/>执行频率：<font color=#871F78>'.$show[4].'</font><hr/>';}
if($conf['sysnum']>='6'){
echo'【系统⑥】<a href="index.php?mod=list&sys=6'.$link.'">>>点击进入</a><br/>系统⑥总任务数：'.$all_sys6.'/'.$conf['max'].'<br/>你的任务数：'.$my_sys6.'<br/>执行频率：<font color=#A67D3D>'.$show[5].'</font><hr/>';}
if($conf['sysnum']>='7'){
echo'【系统⑦】<a href="index.php?mod=list&sys=7'.$link.'">>>点击进入</a><br/>系统⑦总任务数：'.$all_sys7.'/'.$conf['max'].'<br/>你的任务数：'.$my_sys7.'<br/>执行频率：<font color=#A67D3D>'.$show[6].'</font><hr/>';}
if($conf['sysnum']>='8'){
echo'【系统⑧】<a href="index.php?mod=list&sys=8'.$link.'">>>点击进入</a><br/>系统⑧总任务数：'.$all_sys8.'/'.$conf['max'].'<br/>你的任务数：'.$my_sys8.'<br/>执行频率：<font color=#A67D3D>'.$show[7].'</font><hr/>';}
echo'</div>';
echo '<div class="w h">运行日志:&nbsp&nbsp<a href="index.php?mod=all">详细>></a></div><div class="box">系统共有'.$zongs.'条任务<br>系统累计运行了'.$info['times'].'次<br>上次运行:'.$info['last'].'<br>当前时间:'.$date.'</div>';
if(function_exists("sys_getloadavg")){
$arr=sys_getloadavg();
echo '<div class="w h">系统负载:</div>';
$f=sys_getloadavg();
echo'<div class="box">';
echo"1min：{$f[0]}";
echo"|5min：{$f[1]}";
echo"|15min：{$f[2]}";
echo'</div>';
	}
  }
else{
showmsg('登录失败，可能是密码错误或者身份失效了，请<a href="index.php?mod=login">重新登录</a>！',3);}

echo'<div class="copy"><a href="index.php">返回首页</a>-<a href="index.php?mod=help">功能介绍</a>-<a href="index.php?my=loginout">退出</a>';
include(ROOT.'includes/foot.php');
echo'</div>';
if($conf['sjyl']==1)
{$txt=file(ROOT.'includes/content/content.db');
shuffle($txt);
echo"$txt[0]";}
echo'</body></html>';
?>